﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using Visifire.Gauges;

namespace CPPEI.Coolzon.UI.DataPartLib
{
    public partial class DataGaugeDoubleCircularScale
    {
        public MarkerIndicator SetMarker2Indicator(MarkerIndicator marker2Indicator)
        {
            marker2Indicator.BorderBrush = Marker2BorderBrush==null? null : Marker2BorderBrush.Brush;
            marker2Indicator.BorderThickness = Marker2BorderThickness;
            marker2Indicator.Background = Marker2Background==null? null : Marker2Background.Brush;
            marker2Indicator.LabelBackground = Marker2LabelBackground==null? null : Marker2LabelBackground.Brush;
            marker2Indicator.LabelEnabled = Marker2LabelEnabled;
            marker2Indicator.LabelFontColor = Marker2LabelFontColor==null? null : Marker2LabelFontColor.Brush;
            marker2Indicator.LabelFontFamily = Marker2LabelFontFamily;
            marker2Indicator.LabelFontWeight = Marker2LabelFontWeight;
            marker2Indicator.MarkerShape = Marker2Shape;
            marker2Indicator.Placement = Marker2Placement;
            marker2Indicator.ShadowEnabled = Marker2ShadowEnabled;
            marker2Indicator.ToolTipText = Marker2ToolTipText;
            if (Marker2DistanceFromScale >= 0 && Marker2DistanceFromScale <= 1)
                marker2Indicator.DistanceFromScale = Marker2DistanceFromScale;
            if (Marker2IndicatorLength >= 0 && Marker2IndicatorLength <= 1)
                marker2Indicator.IndicatorLength = Marker2IndicatorLength;
            if (Marker2IndicatorWidth >= 0 && Marker2IndicatorWidth <= 1)
                marker2Indicator.IndicatorWidth = Marker2IndicatorWidth;

            return marker2Indicator;
        }
        private BrushEx marker2BorderBrush;
        private Thickness marker2BorderThickness;
        private BrushEx marker2Background;
        private BrushEx marker2LabelBackground;
        private bool marker2LabelEnabled;
        private BrushEx marker2LabelFontColor;
        private FontFamily marker2LabelFontFamily;
        private FontWeight marker2LabelFontWeight;
        private Visifire.Gauges.Shapes marker2Shape;
        private PlacementTypes marker2Placement;
        private bool marker2ShadowEnabled;
        private string marker2ToolTipText;


        private double marker2DistanceFromScale;
        private double marker2IndicatorLength;
        private double marker2IndicatorWidth;

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识边框颜色")]
        [Description("Marker2BorderBrush")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2BorderBrush", "标识边框颜色")]
        public BrushEx Marker2BorderBrush
        {
            get
            {
                return marker2BorderBrush;
            }

            set
            {
                marker2BorderBrush = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识边框大小")]
        [Description("Marker2BorderThickness")]
        [Editor(typeof(UI.XProperty.Editors.XThicknessEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2BorderThickness", "标识边框大小")]
        public Thickness Marker2BorderThickness
        {
            get
            {
                return marker2BorderThickness;
            }

            set
            {
                marker2BorderThickness = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识背景颜色")]
        [Description("Marker2Background")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2Background", "标识背景颜色")]
        public BrushEx Marker2Background
        {
            get
            {
                return marker2Background;
            }

            set
            {
                marker2Background = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识标签背景颜色")]
        [Description("Marker2LabelBackground")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2LabelBackground", "标识标签背景颜色")]
        public BrushEx Marker2LabelBackground
        {
            get
            {
                return marker2LabelBackground;
            }

            set
            {
                marker2LabelBackground = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识是否显示标签")]
        [Description("Marker2LabelEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2LabelEnabled", "标识是否显示标签")]
        public bool Marker2LabelEnabled
        {
            get
            {
                return marker2LabelEnabled;
            }

            set
            {
                marker2LabelEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识标签字体颜色")]
        [Description("Marker2LabelFontColor")]
        [Editor(typeof(UI.XProperty.Editors.XBrushEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2LabelFontColor", "标识标签字体颜色")]
        public BrushEx Marker2LabelFontColor
        {
            get
            {
                return marker2LabelFontColor;
            }

            set
            {
                marker2LabelFontColor = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识标签字体")]
        [Description("Marker2LabelFontFamily")]
        [Editor(typeof(UI.XProperty.Editors.XFontFamilyEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2LabelFontFamily", "标识标签字体颜色")]
        public FontFamily Marker2LabelFontFamily
        {
            get
            {
                return marker2LabelFontFamily;
            }

            set
            {
                marker2LabelFontFamily = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识标签字体粗细")]
        [Description("Marker2LabelFontWeight")]
        [Editor(typeof(UI.XProperty.Editors.XFontWeightEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2LabelFontWeight", "标识标签字体粗细")]
        public FontWeight Marker2LabelFontWeight
        {
            get
            {
                return marker2LabelFontWeight;
            }

            set
            {
                marker2LabelFontWeight = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识形状")]
        [Description("Marker2Shape")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XShapesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2Shape", "标识形状")]
        public Shapes Marker2Shape
        {
            get
            {
                return marker2Shape;
            }

            set
            {
                marker2Shape = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识位置")]
        [Description("Marker2Placement")]
        [Editor(typeof(UI.DataPartLib.XProperty.Editors.XPlacementTypesEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2Placement", "标识位置")]
        public PlacementTypes Marker2Placement
        {
            get
            {
                return marker2Placement;
            }

            set
            {
                marker2Placement = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识是否显示阴影")]
        [Description("Marker2ShadowEnabled")]
        [Editor(typeof(UI.XProperty.Editors.XBooleanEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2ShadowEnabled", "标识是否显示阴影")]
        public bool Marker2ShadowEnabled
        {
            get
            {
                return marker2ShadowEnabled;
            }

            set
            {
                marker2ShadowEnabled = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识提示")]
        [Description("Marker2ToolTipText")]
        [Editor(typeof(UI.XProperty.Editors.XStringEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2ToolTipText", "标识提示")]
        public string Marker2ToolTipText
        {
            get
            {
                return marker2ToolTipText;
            }

            set
            {
                marker2ToolTipText = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识距离标尺距离(0-1)")]
        [Description("Marker2DistanceFromScale")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2DistanceFromScale", "标识距离标尺距离(0-1)")]
        public double Marker2DistanceFromScale
        {
            get
            {
                return marker2DistanceFromScale;
            }

            set
            {
                marker2DistanceFromScale = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识指针长度(0-1)")]
        [Description("Marker2IndicatorLength")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2IndicatorLength", "标识指针长度(0-1)")]
        public double Marker2IndicatorLength
        {
            get
            {
                return marker2IndicatorLength;
            }

            set
            {
                marker2IndicatorLength = value;
                Refresh();
            }
        }

        [Category("第二表盘标识")]
        [DisplayName("第二表盘标识指针宽度(0-1)")]
        [Description("Marker2IndicatorWidth")]
        [Editor(typeof(UI.XProperty.Editors.XDoubleEditor), typeof(UI.XProperty.XPropertyValueEditor))]
        [XProperty(XPropertyCategory.Other, "Marker2IndicatorWidth", "标识指针宽度(0-1)")]
        public double Marker2IndicatorWidth
        {
            get
            {
                return marker2IndicatorWidth;
            }

            set
            {
                marker2IndicatorWidth = value;
                Refresh();
            }
        }
    }
}
